﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using RedDragon.Common.DBContext;

namespace RedDragon.RBAC.API.Controllers
{
    /// <summary>
    /// 迁移执行文件
    /// </summary>
    [Route("[controller]")]
    [ApiController]
    public class InitDBController : ControllerBase
    {
        private readonly SqlSugarDBContext _sqlSugarDBContext;

        public InitDBController(SqlSugarDBContext sqlSugarDBContext)
        {
            this._sqlSugarDBContext = sqlSugarDBContext;
        }
        [HttpGet]
        public string InitDataBase()
        {
            _sqlSugarDBContext.CreateDatabase();
            return "OK";
        }
    }
}
